import React from 'react';
import NavBar from '../Common/NavBar';
import { Connect } from '../../service/Connect';
import './List.scss';
class List extends React.Component{
  constructor(props){
    super(props);
    this.state = props
    console.log(this.state)
  }
  componentDidMount(){
      console.log(this.props)
      if(this.props.data && this.props.data.length>0){
        console.log(this.props)
        console.log(11111)
      }
  }
  render(){
    return(<div>
      <NavBar title="列表页" /> 
      <ul className="content list">
        {
          this.props.data.resultscrollList && this.props.data.resultscrollList.length > 0 &&
          this.props.data.resultscrollList.map((item, index) => (
            <li key={index}>
              <strong>名称: </strong>
              <span>{ item }</span>
            </li>
          ))
        }
      </ul>
    </div>)
  }
}
export default Connect(List);
